<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>生命周期</title>
</head>
<body>
<div id="name">
    {{name}}
</div>
<script src="../node_modules/vue/dist/vue.js"></script>
<script>
    let vue = new Vue({
        el: "#name",
        data: {
            name: "java"
        },
        created() {//el之前渲染
            this.name = "dss";
        },
        mounted() {//全部创建之后渲染
            this.name = "hsadhkj"
        }

    });
</script>
</body>
</html>